{
 "cells": [
  {
   "cell_type": "raw",
   "metadata": {
    "pycharm": {
     "name": "#%% raw\n"
    },
    "raw_mimetype": "text/restructuredtext"
   },
   "source": [
    ".. _nb_dascmop:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## DAS-CMOP\n",
    "\n",
    "DAS-CMOP is a constrained multi-objective test suite with tunable constraints <cite data-cite=\"dascmop\"></cite>. The constraints are tuned using a difficulty triplet: $(\\eta, \\zeta, \\gamma)$, with $\\eta, \\zeta, \\gamma \\in [0, 1]$. The triplet allows to adjust the diversity, the feasibility and the convergence hardness respectively.\n",
    "\n",
    "There are 6 biobjective problems DAS-CMOP1-6 (11 constraints) and 3 three-objective problems DAS-CMOP7-9 (7 constraints). Each of these can be initialized with a custom difficulty triplet or the authors proposed a set of 16 triplets:\n",
    "\n",
    "|No. | Difficulty     | No. | Difficulty     | No | Difficulty     | No | Difficulty\n",
    "|---|---|---|---|---|---|---|---\n",
    "| 1  | (0.25,0.0,0.0) | 2   | (0.0,0.25,0.0) | 3  | (0.0,0.0,0.25) | 4  | (0.25,0.25,0.25)\n",
    "| 5  | (0.5,0.0,0.0)  | 6   | (0.0,0.5,0.0)  | 7  | (0.0,0.0,0.5)  | 8  | (0.5,0.5,0.5)\n",
    "| 9  | (0.75,0.0,0.0) | 10  | (0.0,0.75,0.0) | 11 | (0.0,0.0,0.75) | 12 | (0.75,0.75,0.75)\n",
    "| 13 | (0.0,1.0,0.0)  | 14  | (0.5,1.0,0.0)  | 15 | (0.0,1.0,0.5)  | 16 | (0.5,1.0,0.5)\n",
    "\n",
    "The Pareto fronts are different for each triplet."
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {
    "pycharm": {
     "name": "#%% raw\n"
    },
    "raw_mimetype": "text/restructuredtext"
   },
   "source": [
    ".. _nb_dascmop1:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "### DAS-CMOP1 (1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "from pymoo.problems import get_problem\n",
    "from pymoo.util.plotting import plot\n",
    "\n",
    "problem = get_problem(\"dascmop1\", 1)\n",
    "plot(problem.pareto_front(), no_fill=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "### DAS-CMOP7 (12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "from pymoo.problems import get_problem\n",
    "from pymoo.visualization.scatter import Scatter\n",
    "\n",
    "pf = get_problem(\"dascmop7\", 12).pareto_front()\n",
    "Scatter(angle=(45, 45)).add(pf, color=\"red\").show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "from pymoo.problems import get_problem\n",
    "from pymoo.visualization.scatter import Scatter\n",
    "\n",
    "pf = get_problem(\"dascmop7\", 12).pareto_front()\n",
    "Scatter(angle=(45, 45)).add(pf, color=\"red\").show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "<sub>Python implementation by [cyrilpic](https://github.com/cyrilpic) based on the [original JAVA code](http://imagelab.stu.edu.cn/Content.aspx?type=content&Content_ID=1310).</sub>"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 4
}
